<?php
require 'vendor/autoload.php';
//接入文档地址https://doc.baiopen.com
$config = [
    "access_token"          => "您的token",
    "sign_key"          => "您的签名key",
];
$xinlian = new \XinLian\OpenApi($config);
//查询余额
$response = $xinlian->queryBalance();
//返回结果是一个ResponseInterface对象，详细参数请查看guzzle官方文档
$body = $response->getBody()->getContents();
//body响应结果
//{
//    "data": {
//      "predict_money": "0.00",
//      "credit_money": "0.00"
//    },
//    "attach": "",
//    "timestamp": "1711621761983",
//    "code": 200,
//    "message": "请求成功",
//    "sign": "3cc1a249609a8c95a0fa757cbd88a023"
//}

//查询地区
//$response = $xinlian->queryArea();
//创建订单
//$response = $xinlian->createOrder();
//查询订单
//$response = $xinlian->queryOrder();
//查询手机号归属地
//$response = $xinlian->queryRegion();
//取消订单
//$response = $xinlian->cancelOrder();
//查询余额
//$response = $xinlian->queryBalance();
//查询类目
//$response = $xinlian->queryCategory();
//查询商品
//$response = $xinlian->queryProduct();
//查询商品sku
//$response = $xinlian->querySku();

var_dump($body);